//
//  NSCharacterSet.swift
//  Documentation
//
//  Created by Toj on 28/12/23.
//

open class NSMutableCharacterSet : NSCharacterSet, NSCopying, NSMutableCopying, NSSecureCoding {

    // 添加 range范围内的Unicode
    open func addCharacters(in aRange: NSRange)
    // 移除 range范围内的Unicode
    open func removeCharacters(in aRange: NSRange)

    // 添加字符串中的字符
    open func addCharacters(in aString: String)

    // 移除字符串中的字符
    open func removeCharacters(in aString: String)

    // 修改接收者的内容, 使集合为两个集合的交集
    open func formUnion(with otherSet: CharacterSet)

    // 修改接收者内容，全集合为两个集合的并集
    open func formIntersection(with otherSet: CharacterSet)
    // 反转字符集,仅包含当前字符集中不存在的字符
    open func invert()

    // MARK: 同 NSCharacterSet
    
    open class func control() -> NSMutableCharacterSet

    open class func whitespace() -> NSMutableCharacterSet

    open class func whitespaceAndNewline() -> NSMutableCharacterSet

    open class func decimalDigit() -> NSMutableCharacterSet

    open class func letter() -> NSMutableCharacterSet

    open class func lowercaseLetter() -> NSMutableCharacterSet

    open class func uppercaseLetter() -> NSMutableCharacterSet

    open class func nonBase() -> NSMutableCharacterSet

    open class func alphanumeric() -> NSMutableCharacterSet

    open class func decomposable() -> NSMutableCharacterSet

    open class func illegal() -> NSMutableCharacterSet

    open class func punctuation() -> NSMutableCharacterSet

    open class func capitalizedLetter() -> NSMutableCharacterSet

    open class func symbol() -> NSMutableCharacterSet

    @available(iOS 2.0, *)
    open class func newline() -> NSMutableCharacterSet

    
    public /*not inherited*/ init(range aRange: NSRange)

    public /*not inherited*/ init(charactersIn aString: String)

    public /*not inherited*/ init(bitmapRepresentation data: Data)

    public /*not inherited*/ init?(contentsOfFile fName: String)
}
